package day03;

public class IfElseDemo {
    public static void main(String[] args) {

        double price=2350.0;//带数 1500.0 375.0 888.0
        if (price>=2000){
            price*=0.5;
        }else if(price>=1000){
            price*=0.7;
        }else if(price>=500){
            price*=0.8;
        }else{
            price*=0.9;
        }
        System.out.println(price);










        /*double price=335.0;//-100   1230  658 335
        if(price>=1000){
            price*=0.7;
            System.out.println("最终金额="+price);
        } else if(price>=500){
            price*=0.8;
            System.out.println("最终金额="+price);
        } else if(price>=0){
            price*=0.9;
            System.out.println("最终金额="+price);
        } else {
            System.out.println("Error");
        }

         */
    }
}
